$(document).ready(function() {
    // set up the news accordion on the lower page
    $("#deaccordian").accordion({header: "h4" ,icons: false,autoHeight: false,navigation: true});
    $("li a:contains(Admin)").addClass('current');
    $("#boardCompare tbody tr:even").addClass("even");
    $("#boardCompare tbody tr:odd").addClass("odd");
    $("div.detail").hide();
    $("#boardCompare tbody tr").click(highlight);
    $( "#slider" ).slider({
			value:5,
			min: 0,
			max: 30,
			step: 1,
			slide: function( event, ui ) {
				$( "#amount" ).val(  ui.value );
			}
    });
    $( "#amount" ).val( $( "#slider" ).slider( "value" ) );
    $("input#n").val("");

    $("#mainContent  input:submit").button();

});
function highlight(evt)
{
   $("#boardCompare tbody tr").removeClass("clickrow");
   $(this).addClass("clickrow");
   var id=$(this).html();
   id=id.substring(id.indexOf(">")+1,id.indexOf("</td>"));
  // alert(id);
   var hidden='<input type="hidden" name="id" value='+id+" />";
   $("div.detail form").prepend(hidden);
   $("div.detail").slideDown("slow");
   
}

